<style>
	table th, table td{
		text-align: center !important;
	}
	.page-content .portlet .portlet-search-body .search-item{
		width: 15%;
	}
</style>

<div class="portlet">
    <div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>
    <form class="portlet-search-body" name="queryForm">

		<input type="text" class="form-control search-item" ng-model="empName" placeholder="员工姓名">
        <select class="form-control search-item" ng-model="status"
                ng-options="opt.value as opt.name for opt in options.emptransferstatus">
            <option value="" disabled selected hidden>-- 调动状态 --</option>
        </select>
        <div class="input-group input-large date-picker input-daterange" ed-date-picker style="float: left;margin-right: 10px;">
            <input type="text" class="form-control" ng-model="makeTimeStart" placeholder="操作时间(开始)">
            <span class="input-group-addon">- </span>
            <input type="text" class="form-control" ng-model="makeTimeEnd" placeholder="操作时间(截止)">
        </div>
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'empTransfer/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
				<th data-options="field: 'empName'">员工姓名</th>
                <th data-options="field: 'befDeptName'">调动前部门</th>
                <th data-options="field: 'befPosName'">调动前岗位</th>
                <th data-options="field: 'aftDeptName'">调动后部门</th>
                <th data-options="field: 'aftPosName'">调动后岗位</th>
                <th data-options="field: 'reason'">调动原因</th>
                <th data-options="field: 'status | code : emptransferstatus'">调动状态</th>
                <th data-options="field: 'makeTime | limitTo : 10'">操作时间</th>
                <th data-options="field: 'remark'">备注</th>
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: 'xxxx', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
        	<div class="form-group">
				<label class="col-md-2 control-label">员工姓名</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="empName" ng-model="empTransfer.empName" required>
            	</div>
            </div>

        	<div class="form-group">
				<label class="col-md-2 control-label">调动前部门</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="befDeptName" ng-model="empTransfer.befDeptName" required>
				</div>
				<label class="col-md-2 control-label">调动前岗位</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="befPosName" ng-model="empTransfer.befPosName" required>
            	</div>
            </div>

        	<div class="form-group">
				<label class="col-md-2 control-label">调动后部门</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="aftDeptName" ng-model="empTransfer.aftDeptName" required>
				</div>
				<label class="col-md-2 control-label">调动后岗位</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="aftPosName" ng-model="empTransfer.aftPosName" required>
            	</div>
            </div>

			<div class="form-group">
				<label class="col-md-2 control-label">调动原因</label>
				<div class="col-md-10">
					<input type="text" class="form-control" name="reason" ng-model="empTransfer.reason" required>
				</div>
			</div>

			<div class="form-group">
				<label class="col-md-2 control-label">备注</label>
				<div class="col-md-10">
					<input type="text" class="form-control" name="remark" ng-model="empTransfer.remark" required>
				</div>
			</div>

        </div>

        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" w5c-form-submit="grid.save();">
                <i class="fa fa-check"></i> 确定
            </button>
        </div>
    </form>
</div>
